//首页管理接口
import request from "@/utils/request.ts";

//引入返回的数据类型
import type  {HospitalResponseData,HospitalLevelAndRegionResponseData,HospitalInfo} from "@/api/home/type.ts";

enum API {
    HOSPITAL_URL = '/hosp/hospital/',
    //获取医院等级与地区接口
    HOSPITALLEVELANDREGION_URL='/cmn/dict/findByDictCode/',
    //关键词获取医院信息接口
    HOPITALINFO_URL='/hosp/hospital/findByHosname/',

}

export const reqHospital = (page: number, limit: number,hostype='',districtCode='') => request.get<any,HospitalResponseData>(API.HOSPITAL_URL + `${page}/${limit}?hostype=${hostype}$districtCode=${districtCode}`);
//获取医院的等级或地区的数据
export const reqHospitalLevelAndRegion=(dictCode:string)=>request.get<any,HospitalLevelAndRegionResponseData>(API.HOSPITALLEVELANDREGION_URL+dictCode);
//关键词获取医院信息
export const reqHospitalInfo=(hosname:string)=>request.get<any,HospitalInfo>(API.HOPITALINFO_URL+hosname);



